package containers;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.CopyOnWriteArrayList;

public class FailFast {
    public static void main(String[] args) {
        Collection<String> c= new ConcurrentLinkedQueue<String>();
        Iterator<String> it=c.iterator();
        c.add("An object");
        c.add("kdkdk");
        try {
            String s=it.next();
        }catch (ConcurrentModificationException e){
            System.out.println(e);
        }
    }
}
